<?php

$userid         	= get_loggedin_userid();
$interest_id    	= get_input('interest_id');

// params
$image_url		= get_input('image_url');

if($interest_id) {
    add_photo($interest_id, $image_url);
    echo json_encode(export_result(200, array($interest_id)));
} else {
    echo json_encode(export_result(200, array()));
}
?>